import java.util.Scanner;

public class test16 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.next();
        StringBuilder stringBuilder1 = new StringBuilder(); // 用来存储最长的那一个
        StringBuilder stringBuilder2 = new StringBuilder();
        int flag=0;
        while (flag<str.length()){
            // 只要下标left和right都在一个范围内,那么就可以继续往后走
            if(str.charAt(flag)>='0'&&str.charAt(flag)<='9'){
                stringBuilder2.append(str.charAt(flag));
                flag++;
                continue;
            }
            // 判定为不是数组,那么此时就需要对两个builder来进行长度判断,然后将第二个进行清空
            if(stringBuilder1.length()<stringBuilder2.length()){
                stringBuilder1.delete(0,stringBuilder1.length());
                stringBuilder1.append(stringBuilder2);
            }
            stringBuilder2.delete(0,stringBuilder2.length());
            flag++;
        }
        if(stringBuilder1.length()<stringBuilder2.length()){
            stringBuilder1.delete(0,stringBuilder1.length());
            stringBuilder1.append(stringBuilder2);
        }
        System.out.println(stringBuilder1.toString());
    }
}
